FROM lw_php-fpm_updated:7.4

#################### lw_php-fpm_updated:7.4

#MAINTAINER laowu "alyadan@163.com"
#ENV TZ=Asia/Shanghai
#RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
#RUN apt-get update

RUN apt-get install -y \
#RUN apt-get install -y \
        git \
        libfreetype6-dev \
        libjpeg62-turbo-dev \
        libpng-dev \
		libzip-dev \
		net-tools \
		vim \
#&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
	&& docker-php-ext-configure gd  \
	&& docker-php-ext-install -j$(nproc) gd \
	&& docker-php-ext-install zip \
	&& docker-php-ext-install pdo_mysql \
	&& docker-php-ext-install opcache \
	&& docker-php-ext-install mysqli \
	&& docker-php-ext-install pcntl \
	&& pecl install protobuf \
	&& docker-php-ext-enable protobuf \
	&& pecl install grpc \
	&& docker-php-ext-enable grpc \
	&& pecl install redis \
	&& docker-php-ext-enable redis

#&& rm -r /var/lib/apt/lists/*

# 将预先下载好的拓展包从宿主机拷贝进去
#COPY ./pkg/redis.tgz /home/redis.tgz

# 安装 Composer
ENV COMPOSER_HOME /root/composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
ENV PATH $COMPOSER_HOME/vendor/bin:$PATH

#RUN rm -f /home/redis.tgz 

WORKDIR /data

# Write Permission
RUN usermod -u 1000 www-data

#################### tag:7.2
##设置时区
#ENV TZ=Asia/Shanghai
#RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
#
## 更新安装依赖包和PHP核心拓展
#RUN apt-get update && apt-get install -y \
##RUN apt-get install -y \
#        git \
#        libfreetype6-dev \
#        libjpeg62-turbo-dev \
#        libpng-dev \
#		net-tools \
#		vim \
##&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
#    && docker-php-ext-configure gd  \
#    && docker-php-ext-install -j$(nproc) gd \
#        && docker-php-ext-install zip \
#        && docker-php-ext-install pdo_mysql \
#        && docker-php-ext-install opcache \
#		&& docker-php-ext-install mysqli  \
#		&& pecl install swoole \
#		&& docker-php-ext-enable swoole
#
##&& rm -r /var/lib/apt/lists/*
#
## 将预先下载好的拓展包从宿主机拷贝进去
##COPY ./pkg/redis.tgz /home/redis.tgz
#
## 安装 Composer
#ENV COMPOSER_HOME /root/composer
#RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
#ENV PATH $COMPOSER_HOME/vendor/bin:$PATH
#
##RUN rm -f /home/redis.tgz 
#
#WORKDIR /data
#
## Write Permission
#RUN usermod -u 1000 www-data

#########################tag 7.2-1


#RUN docker-php-ext-install bcmath
#RUN pecl install redis
#RUN docker-php-ext-enable redis
#
#RUN docker-php-ext-install pcntl
#RUN docker-php-ext-install sockets
#RUN apt update
#RUN apt install -y libevent-dev libssl-dev
#RUN pecl install event
#RUN docker-php-ext-enable event
#
#COPY .ssh /var/www/.ssh
#RUN chown www-data:www-data -R /var/www/.ssh
#
#
